<div class="container">

    <div class="page-header">
        <div class="row">
            <h1 class="span8">View all objects</h1>
            <span class="span4">

            </span>
        </div>


    </div>


    <div class="row">

        <div class="span12">

            <div class="demo_jui">

                <table class="table table-striped table-bordered table-condensed objects-view">
                    <thead>
                        <tr>
                            <th class="unit">Unit Code</th>
                            <th>Destination</th>
                            <th>Type</th>
                            <th>Surface</th>
                            <th>Price</th>
                            <th class="th-action center">Action</th>
                        </tr>
                    </thead>
                    <tbody>

                        <?  foreach($objects as $object): ?> 

                            <tr>
                                <td><?=$object['object_ID']?></td>
                                <td><strong><?=$object['destination_name']?></strong></td>              
                                <td><?=$object['object_type_type']?> </td>
                                <td><?=$object['object_surface']?> m2 </td>
                                <td><strong><?
                                            $price = (int)$object['object_price'];
                                            if($price == 0)
                                            {
                                                echo $object['object_price']; 
                                            } 
                                            else echo number_format($object['object_price']).' &euro;'
                                        ?>

                                    </strong></td>
                                <td class="center">
                                    <a href="<?=base_url()?>objects/view_edit/<?=$object['object_ID']?>?post_type=realestate">Edit</a> |
                                    <a href="<?=base_url()?>objects/delete/<?=$object['object_ID']?>?post_type=realestate" class="delete_post">Delete</a>
                                </td>
                            </tr>                                      

                            <? endforeach; ?>

                    </tbody>
                </table>

            </div>

        </div>

    </div>

</div>
